<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>popout-menu</title>
    <style>
        .reference {
            position: relative;
            background: #2396ef;
            width: 100px;
            height: 80px;
            cursor: pointer;
        }
        .popout-menu {
            position: absolute;
            visibility: hidden;
            left: 100%;
            background-color: #9c27b0;
            color: #fff;
            padding: 16px;
            transition: visibility .4s ease-in-out;
        }
        .reference:hover > .popout-menu,
        .reference:focus > .popout-menu,
        .reference:focus-within > .popout-menu {
            visibility: visible;
        }
    </style>
</head>
<body>
    <div class="reference" tabindex="0">
        <div class="popout-menu">Popout menu</div>
    </div>
</body>
</html>